﻿<%@ WebHandler Language="C#" Class="IsExistOrNot" %>

using System;
using System.Web;

public class IsExistOrNot : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        BLL.Users blluser = new BLL.Users();
        if (context.Request.Form["name"] != null)
        {
            string Name = context.Request.Form["name"].ToString();
            try
            {
                if (blluser.Exist(Name))
                {
                    context.Response.Write("yes");
                }
                else
                {
                    context.Response.Write("no");
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}